See
There are 4 types in that
Type 1
For acids if the only the acid is given then you have to check the replaceable hydrogen atom it contains
If a reaction is given then you have to check the replaced hydorgen atom
Type 2
For bases if the only the acid is given then you have to check the replaceable hydroxyl ion it contains
If a reaction is given then you have to check the replaced hydroxyl ion
Type 3
For salts you have check the total positive charge on the salt
For e.g FeSo4.(NH4)2SO4.6H2O
See this you donot have to consider the water And the total positive charge is Fe +2 + NH4 +1*2 = +4 Therefore the n factor is 4