In this paper, we time-change the generalized counting process (GCP) by an independent inverse mixed stable subordinator to obtain a fractional version of the GCP. We call it the mixed fractional counting process (MFCP). The system of fractional differential equations that governs its state probabilities is obtained using the Z transform method. Its one-dimensional distribution, mean, variance, covariance, probability generating function, and factorial moments are obtained. It is shown that the MFCP exhibits the long-range dependence property whereas its increment process has the short-range dependence property. As an application we consider a risk process in which the claims are modelled using the MFCP. For this risk process, we obtain an asymptotic behaviour of its finite-time ruin probability when the claim sizes are subexponentially distributed and the initial capital is arbitrarily large. Later, we discuss some distributional properties of a compound version of the GCP.