Context : Aims : This paper studies the galaxy cosmological mass function ( GCMF ) in a semi-empirical relativistic approach that uses observational data provided by recent galaxy redshift surveys . Methods : Starting from a previously presented relation between the mass-to-light ratio , the selection function obtained from the luminosity function ( LF ) data and the luminosity density , the average luminosity L , and the average galactic mass \mathcal { M } _ { g } were computed in terms of the redshift . \mathcal { M } _ { g } was also alternatively estimated by means of a method that uses the galaxy stellar mass function ( GSMF ) . Comparison of these two forms of deriving the average galactic mass allowed us to infer a possible bias introduced by the selection criteria of the survey . We used the FORS Deep Field galaxy survey sample of 5558 galaxies in the redshift range 0.5 < z < 5.0 and its LF Schechter parameters in the B-band , as well as this sample ’ s stellar mass-to-light ratio and its GSMF data . Results : Assuming { \mathcal { M } _ { g _ { 0 } } } \approx 10 ^ { 11 } \mathcal { M } _ { \odot } as the local value of the average galactic mass , the LF approach results in L _ { B } \propto ( 1 + z ) ^ { ( 2.40 \pm 0.03 ) } and \mathcal { M } _ { g } \propto ( 1 + z ) ^ { ( 1.1 \pm 0.2 ) } . However , using the GSMF results to calculate the average galactic mass produces \mathcal { M } _ { g } \propto ( 1 + z ) ^ { ( -0.58 \pm 0.22 ) } . We chose the latter result because it is less biased . We then obtained the theoretical quantities of interest , such as the differential number counts , to finally calculate the GCMF , which can be fitted by a Schechter function , but whose fitted parameter values are different from the values found in the literature for the GSMF . Conclusions : This GCMF behavior follows the theoretical predictions from the cold dark matter models in which the less massive objects form first , followed later by more massive ones . In the range 0.5 < z < 2.0 the GCMF has a strong variation that can be interpreted as a higher rate of galaxy mergers or as a strong evolution in the star formation history of these galaxies .