With the rapid popularity of smart terminals, the device-to-device(D2D) communication is recognized as one of the most promising techniques in the fifth-generation(5G) communications networks due to its capabilities of substantially improving the spectral efficiency, relieving the traffic burden in the base stations(BSs), and reducing the terminals' power consumptions, etc. By properly activating some D2D links(DLs), the sum data rate of the D2D-aided cellular networks(CNs) can be substantially improved. However, constrained by the severe interference imposed on the conventional cellular users (CUs) by the activating D2D users (DUs), the sum data rate of the D2D-aided CNs cannot be unlimitedly improved in a crude way of simply increasing the number/density of DLs. In other words, there must exist a maximum/optimal number of activating DLs in terms of the sum data rate, as revealed in this paper. By identifying the maximum/optimal number of activating DLs, the closed-form expressions for sum data rates of both cellular links(CLs) and DLs can be obtained. Numerical results show that the optimum number of activating DLs, as a function of several critical parameters such as DU's transmit power, signalto-interference-plus-noise ratio threshold and outage probability of CLs/DLs, etc, can be determined by implementing the proposed algorithms.