A counting model for software reliability analysis