The number of people living in any area or country is called total population of the area or country.
Density of population is the ratio between total population and a total area of that region or country.
For example, as per the census of 2011, Density of population in India is 325 persons per sq. km. It is a ratio between total population in India and total area of India in sq. kms.
In some countries total population may be less but the density of population is high due to small area of the country.
For example, Bangladesh’s total population is less but area of country is small therefore, density of population is high.
In some countries total population may be more but the density of population is low due to very large area of the country.
For example, Brazil has more total population but area of country is also large therefore, density of population is low.
Thus, population density is a function of population and area of a region.