Software defect prediction can make software quality assurance (SQA) process more efficient, economic and targeted. Previous studies mainly focused on classifying software modules as defect-prone or not. However, prediction the number of defects for a new software module is rarely investigated. Moreover, these studies built models independently for each project, which may ignore the relatedness among multiple projects. To effectively utilize the relatedness, we propose a novel approach MPR (multiproject regression) for SDNP (software defect number prediction). To verify the effectiveness of MPR, we perform experimental studies on 30 real-world projects and compare our approach with 6 state-of-the-art baselines (i.e., LR, NNR, SVR, DTR, BRR and DBR). AAE (Average absolute error) and ARE (average relative error) performance measures are used to evaluate the performance of MPR. The results show MPR can achieve better performance in most cases, which indicates the competitiveness of MPR in the context of SDNP.