The number of gaps in binary pictures