We consider the orbit type filtration on a manifold with a locally standard torus action and study the corresponding spectral sequence in homology. When all proper faces of the orbit space are acyclic and the free part of the action is trivial, this spectral sequence can be described in full. The ranks of diagonal terms of its second page are equal to h'-numbers of a simplicial poset dual to the orbit space. Betti numbers of a manifold with a locally standard torus action are computed: they depend on the combinatorics and topology of the orbit space but not on the characteristic function. A toric space whose orbit space is the cone over a Buchsbaum simplicial poset is studied by the same homological method. In this case the ranks of the diagonal terms of the spectral sequence at infinity are the h''-numbers of the simplicial poset. This fact provides a topological evidence for the nonnegativity of h''-numbers of Buchsbaum simplicial posets and links toric topology to some recent developments in enumerative combinatorics.