diff --git a/main/pbx.c b/main/pbx.c
index 1acb811a4bdb733f3dd843492a133d1cc3d8006b..d2b2aa16ef935666e5fa57a23d061485ce4bb1f2 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -7769,6 +7769,7 @@ static int manager_show_dialplan_helper(struct mansession *s, const struct messa
 			continue;	/* not the name we want */
 
 		dpc->context_existence = 1;
+		dpc->total_context++;
 
 		ast_debug(3, "manager_show_dialplan: Found Context: %s \n", ast_get_context_name(c));
 
@@ -7792,8 +7793,6 @@ static int manager_show_dialplan_helper(struct mansession *s, const struct messa
 
 			dpc->extension_existence = 1;
 
-			/* may we print context info? */
-			dpc->total_context++;
 			dpc->total_exten++;
 
 			p = NULL;		/* walk next extension peers */