```ts
/** Fold shelf entries into a final count and a skipped-take tally. */
export function shelfCount(entries: Array<[string, number]>): [number, number] {
  let count = 0;
  let skippedTakes = 0;

  for (const [kind, amount] of entries) {
    if (!["add", "take", "fix"].includes(kind)) {
      throw new Error(`Invalid kind: ${kind}`);
    }
    if (!Number.isInteger(amount) || amount < 0) {
      throw new Error(`Invalid amount: ${amount}`);
    }

    if (kind === "add") {
      count += amount;
    } else if (kind === "take") {
      if (amount > count) {
        skippedTakes++;
      } else {
        count -= amount;
      }
    } else {
      count = amount;
    }
  }

  return [count, skippedTakes];
}
```