Adds spaces count and related tests.