I have stuck with formula how to calculate hosts and subnets.
For instance, I use formulas:
Host = (2^(32-P))-2, where 32 are all bits for network, /P - is prefix
Subnets = 2^(/P-N), where /P is prefix and N - is network part of class A,B or C
if I have mask 255.255.255.128(/P=25) and IP 192.10.1.0, there will be 126 hosts and 2 subnets
hosts = (2^(32-25)-2)=126
and subnets= 2^(25-24)=2, N=24 as it is class C
So if I have address 192.10.1.0 and mask 255.240.0.0, /P=12 and N = 24
hosts = (2^(32-12))-2=1048574
subnets = 2^(12-24) or for this variant I should use formula 2^P to calculate subnets ????