In the NBA how many fouls are you allowed per game?

In the NBA, you are allowed 6 fouls. After you get the sixth foul, you are out for the rest of the game.