The homological degree of a module