Homology of warped product submanifolds in the unit sphere and its applications