A counting Bloom filter (CBF) is commonly used in many applications for the membership queries of dynamic data since the CBF can provide delete operations. A CBF uses an array of c-bit counters. The c should be large enough to avoid overflows. In this letter, we propose an alternative to CBF, named ternary Bloom filter (TBF) for performance improvement. The proposed TBF allocates the minimum number of bits to each counter and includes more number of counters instead to reduce false positive probability. We present a mathematical analysis and experimental results for a set of performance measures. When the TBF consumes the same amount of memory as the CBF, the TBF provides much lower false positive rates than the CBF.