Optical switches play a key role in the field of high-speed optical fiber communication and signal processing. Present work shows the design and implementation of D-flip flop and a two-bit optical counter using optical micro ring resonator (OMRR). The design of the proposed model is developed by considering nonlinear material-based resonators. Here, three OMRR based optical switches are used to design the D-flip flop circuit thereafter two-bit optical counter is implemented using the modeled D-flip flop. The mathematical model of the D-flip flop circuit is provided in the Z-domain by unit delay signal processing approach. The effectiveness of the proposed D flip flop and two-bit down counter circuit is described in the present work. The accuracy and feasibility of the circuits are determined by estimating various performance parameters during simulation.