What VLSM is
VLSM (Variable Length Subnet Masking) splits a network into subnets of different sizes: a /25 for the office, a /26 for the warehouse, a /30 or /31 for a router link. No addresses are wasted as with equal splits.
How many addresses fit
A /n subnet has 2^(32−n) − 2 host addresses: the first is the network address, the last is broadcast. Exceptions: /31 for point-to-point links (2 addresses, RFC 3021) and /32 for one address. The gateway is usually the first host.