```ts
/** The price of one unit, in whole pence. */
export function unitPrice(total: number, count: number): number {
  if (count === 0 || total < 0) {
    throw new Error("count cannot be zero or total cannot be negative");
  }
  return Math.floor(count * 100 / total);
}
```