We consider a setting where one has to organize one or several group activities for a set of agents. Each agent will participate in at most one activity, and her preferences over activities depend on the number of participants in the activity. The goal is to assign agents to activities based on their preferences in a way that is socially optimal and/or stable. We put forward a general model for this setting, which is a natural generalization of anonymous hedonic games. We then focus on a special case of our model where agents' preferences are binary, i.e., each agent classifies all pairs of the form '(activity, group size)' into ones that are acceptable and ones that are not. We formulate several solution concepts for this scenario, and study them from the computational point of view, providing hardness results for the general case as well as efficient algorithms for settings where agents' preferences satisfy certain natural constraints.