On the dimension of spaces of linear transformations satisfying rank conditions