PunTeams.PlayersPerTeam Null Reference

Debug.Log ("count of players in team " + PunTeams.PlayersPerTeam [PunTeams.Team.red].Count);

gives me NullReferenceException: Object reference not set to an instance of an object. I also used the PickupDemoGui.cs script as a reference point which also gives me the same error (btw this is the exact script from the demo that you supply which is giving me the error as well). I had this working a couple of months ago using the exact same script but now I get errors. Please help

For anyone else having this problem, we have solved this and you can find the solution here.