The city of Detroit, fearful of millions of dollars in lost aid and inaccurate congressional representation, went to court yesterday demanding that the Census Bureau come up with a more accurate population count.

Detroit's landmark lawsuit asked a federal judge to order the bureau to figure into its official 1980 tally the population "undercount" -- the number of people missed in the census taking.

The suit, being closely watched by many of the nation's large cities, contends the government has a constitutional requirement to count "the whole number of persons" living in the country.

Testimony is to begin today in the trial, which is expected to last one to two weeks.

The Census Bureau concedes it missed about 5.3 million people in the 1970 census. A National Urban League demographer who studied the 1970 census estimated federal officials missed 67,000 Detroit residents -- costing the city at least $52 million in federal and state grants through the decade.

The Justice Department said the government would fight Detroit's attempts to have the city's count increased, saying that to do so would undermine the "actual enumeration of the population." Raising Detroit's population figures as the city wishes would put the nation's headcount on "untried and untested" ground that could conflict with the Constitution, the department said.