We present a numerical study of the rheology of a two-fluid emulsion in dilute and semidilute conditions. The analysis is performed for different capillary numbers, volume fraction and viscosity ratio under the assumption of negligible inertia and zero buoyancy force. The effective viscosity of the system increases for low values of the volume fraction and decreases for higher values, with a maximum for about 20 % concentration of the disperse phase. When the dispersed fluid has lower viscosity, the normalised effective viscosity becomes smaller than 1 for high enough volume fractions. To single out the effect of droplet coalescence on the rheology of the emulsion we introduce an Eulerian force which prevents merging, effectively modelling the presence of surfactants in the system. When the coalescence is inhibited the effective viscosity is always greater than 1 and the curvature of the function representing the emulsion effective viscosity vs. the volume fraction becomes positive, resembling the behaviour of suspensions of deformable particles. The reduction of the effective viscosity in the presence of coalescence is associated to the reduction of the total surface of the disperse phase when the droplets merge, which leads to a reduction of the interface tension contribution to the total shear stress. The probability density function of the flow topology parameter shows that the flow is mostly a shear flow in the matrix phase, with regions of extensional flow when the coalescence is prohibited. The flow in the disperse phase, instead, always shows rotational components. The first normal stress difference is positive whereas the second normal difference is negative, with their ratio being constant with the volume fraction. Our results clearly show that the coalescence efficiency strongly affects the system rheology and neglecting droplet merging can lead to erroneous predictions.