In Radio Frequency IDentification (RFID) system, one of the most important issues that affect the data integrity is the collision resolution between the tags when these tags transmit their data to reader. In framed slotted ALOHA based RFID Systems, a proper choice of the frame size has a great influence on overall system performance. Hence, in this paper we develop an accurate method to estimate the number of tags inside the interrogation zone, and then we propose an analytical model to study the system throughput of DFSA based RFID systems. Finally, we use this result to search for an optimal frame size that maximizes the overall system throughput based on current number of un-identified tags. In addition to theoretical analysis, simulations are conducted to evaluate its performance. The results show the proposed scheme outperforms the DFSA algorithm and other variants in both dense and sparse environments.