How many refeeres are there in a basketball game?

In the NBA, there are 3 referees for each game.