Get used to binary arithmetic and it’ll be simple (!).
Actually it’s the subnet mask that tells you the number of hosts, although originally the different classes of IP address were each supposed to support a particular number of hosts. The “0″ part of the mask is the host portion of the address: for example, 255.255.255.0 has 8 bits for the host address; 255.255.0.0 has 16 bits for the host address. With 8 bits you can express any number from 0 to 255; with 16 bits, any number from 0 to 65,535. Those numbers, with a couple of tweaks, are how many hosts you can have on the network.
The tweaks are: a couple of addresses cannot be used by hosts: 0 means “this network,” and all 1s means “broadcast.” So subtract two to get the number of host addresses.
For example, if the IP address is 192.168.1.x and the mask is 255.255.255.0 — we have 8 bits for the host address, so the number of possible addresses is 2^8 or 256 (192.168.1.0 through 192.168.1.255) and the number of possible host addresses is 2^8 – 2 = 254 (192.168.1.1 through 192.168.1.254).
You can use subnetting and supernetting to adjust the maximum number of hosts more flexibly than the original “classful” IPv4 protocol allowed for. Subnetting reduces the size of the host portion of the address so you have more room for the network portion; conversely, supernetting enlarges the host portion so you have more room for host addresses. (This gets into Classless Inter-Domain Routing (CIDR), which you should look up separately). The same formula works: if the mask is 255.255.255.192 (11111111.11111111.11111111.11000000) the host portion is 6 bits long; the maximum number of addresses is 2^6 = 64, maximum number of hosts is 62. If the mask is 255.255.254.0 (11111111.11111111.11111110.00000000), the host portion is 9 bits long; maximum number of addresses is 2^9 or 512, maximum hosts is 510.
A handy calculator is at http://www.subnet-calculator.com.
Sorry if I’ve gone on too long with this, but I didn’t know how much you might know already and I’ve known otherwise competent people to have trouble getting their heads around this at first.