Spaces with bases of countable rank