How to distinguish multiplayer and single player

how do i setup sessions and connections and increment player count