There's a record number of people calling the Big Apple home, and Brooklyn is leading the way when it comes to new residents, according to statistics released on Thursday.

The population for the city reached 8,336,697 last year, a 161,564 increase from 2010, according to census data released by the mayor.

For the first time since before 1950, there are more people moving to the city than leaving it, Mayor Michael Bloomberg said.

The mayor and the Department of City Planning, which tracks population through Census info and other sources, said a number of factors contributed to the surge in residents, such as improved safety, life expectancy and an improving economy.

"If you're going to be living here, you're going to be living a lot longer," Bloomberg said.

Of the boroughs, Brooklyn saw the greatest increase with 60,935 new residents between 2010 and 2012.

Joseph Salvo, the director of Population Division at City Planning, said some of the highest-growing neighborhoods include Bushwick and Williamsburg.

Brooklyn Borough President Marty Markowitz said the various historical, cultural and entertainment draws make Kings County the best place to call home.

"I've always said that Brooklyn is [a] proud home to everyone from everywhere," Markowitz said in a statement, adding that new residents bring "even more character -- and characters -- to Brooklyn!"

Queens came in second when it came to population growth between 2010 and 2012 with a 42,049 increase, followed by Manhattan with 33,217 more residents, the Bronx with 23,365 and Staten Island with 1,998.

The Census Bureau didn't have a method of calculation for the influx of people into the city before 1950, but Salvo said the recent increase was more than an anomaly.

"There are enough years of data to say this is a trend," he said.

Salvo said the main component to the growth was the 150,000 international immigrants moving to the Big Apple, which countered the decreasing number of people coming to NYC from within the U.S.

"The gain of immigration countered the loss of domestic migration," he said.

Salvo noted that the number of people leaving the city has been declining over the last couple of years and that New Yorkers are living longer, increasing the population.

Besides touting how the city is improving, the mayor said he wants more foreigners to not only visit the outer boroughs but consider those areas a place to call home.

"We're trying to get people to see the different neighborhoods and see the opportunities," he said.


Different world
For the first time in at least 63 years, more people are moving to NYC than leaving. We took a look at the city's cultural landscape then and now:

Single subway ride
1950: 10 cents
2013: $2.75

Average Gotham rent
1950: $60/month
2013: $3,956/month

"Billboard Hot 100" song the week of 3/11
1950: "Chattanoogie Shoe Shine Boy" by Red Foley
2013: "Harlem Shake" by Baauer

Marquee Yankee
1950: Joe DiMaggio
2013: Derek Jeter

Biggest Broadway show:
1950: "Guys and Dolls" 2013: "The Book of Mormon"

Latest video