Figure out the boundaries of the region for which you want to know the population density. Think about why you want this number. Perhaps you want to find the population density of your country, your city, or your neighborhood. You will need to find the total area of this place: usually in feet, miles, meters, or kilometers.  Odds are that someone else has already measured and surveyed this area. Look for census data, read an encyclopedia, or run a web search. Find out whether the area has any set boundaries. If not, you'll need to define them yourself. A neighborhood, for instance, may not be listed in the census, so you'll need to draw the borders yourself. Short of counting the population yourself, you'll need to find an up-to-date record of how many people live in this area. Start by running a web search for the population of the place – say, the city of Houston, Texas. Look for the most recent census data for a relatively accurate number. If you are looking for the population of a country, the CIA World Factbook is a good source. If you are calculating the population density for an area that has not already been recorded, you may need to count the population yourself. This might include a colloquially-defined urban neighborhood, for instance, or a population of kangaroos in a section of the Australian Outback. Try to get as accurate a number as possible. If you plan to compare one area against another, make sure that all of your numbers use a common unit of measurement. For instance, if one county is listed in square miles and another is listed in square km, you will need to convert the area of both countries into either square miles or square km. For easy Imperial-to-metric conversions, visit http://www.metric-conversions.org.

TL;DR in Chinese:
明确地区。 确定人口数量。 统一数据单位。